<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function submit() {
            $.ajax({
                type:"POST",
                url:"",
                data:$('aa').serialize()
            })
        }
    </script>
</head>
<body>
<div>
  <form id="aa">
      邮箱:<br>
      <input type="text" name="email">
      <br>
      密码:<br>
      <input type="password" name="password">
      <br><br>
      <input type="submit" value="Submit" onclick="submit()">
  </form>
</div>
</body>
</html>